<?php
session_start();
include("config.php");
include("func/funcphp.php");
include("func/funcsql.php");
if(isConnected()){
	$user = getInfos($_SESSION['id']);
}
?>


<!DOCTYPE html>
<head lang="fr">
	<meta charset="utf-8" />
	<link type="text/css" href="styles/classique/style.css" rel="stylesheet" media="screen"/>
	 <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
	 <link type="text/css" rel="stylesheet" media="only screen and (max-device-width: 480px)" href="styles/mobile/style.css" />

 	<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
 	<script type="text/javascript">
tinyMCE.init({
        mode : "textareas",
        'formats' : {
        'alignleft' : {'selector' : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', attributes: {"align":  'left'}},
        'aligncenter' : {'selector' : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', attributes: {"align":  'center'}},
        'alignright' : {'selector' : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', attributes: {"align":  'right'}},
        'alignfull' : {'selector' : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', attributes: {"align":  'justify'}}
    }

});
</script>

	<title>Association Clematis</title>
</head>
<body>
	<header>
		<div id="haut">

			<div id="img_haut">
				<div id="acces">
			
			 <?php
			 if(isConnected()){?>
			 bonjour <a href="profil.php?id=<?php echo $user['id']; ?>"><em><?php echo $user['pseudo']; ?></em></a> <b>|<a href="deconnexion.php"> deconnexion </a></b><?php
			 }
			 else{
			 	?>
				<a href="connexion.php">se connecter</a> |<a href="inscription.php"> inscription </a></b><?php
			 }
			 ?>
				
		</div>
			<img src="img/theme/classique/banniere2.png"/>
		</div>
		<div id="img_haut_mobile">
			<h2>Clematis</h2>
			
		</div>
<hr />
		<div id="menu">
			
			<nav>
			<ul>
				<li><a href="index.php">Accueil</a></li>
				<li><a href="presentation.php">Présentation</a></li>
				<?php
				if(isConnected()){?>
					<li><a href="liste_membre.php">Membres</a></li>
					<li><a href="projet.php">Projets</a></li>
					<li><a href="profil.php?id=<?php echo $user['id']; ?>">Mon Profil</a></li><?php
					if(estAdmin($user)){ ?>
						<li><a href="gestion.php">Gestions</a></li>
						<?php
					}
				}
				else{?>
					<li><a href="inscription.php">Inscription</a></li>
					<li><a href="connexion.php">Connexion</a></li><?php
				}
				
				?>
				
			</ul>
		</nav>
		
		</div>
<hr />
		</div>
	</header>
	<?php 
